<template>
    <footer class="footer" v-show="length">
        <!-- 统计 -->
        <span class="todo-count">合 计:<strong> {{length}} </strong></span>
        <!-- 清空 -->
        <button class="clear-completed" @click="clear">
            清空任务
        </button>
    </footer>
</template>

<script>
export default {
    methods: {
        clear() {
            this.$emit('clear')
        }
    },
    props: {
        length: {
            type: Number,
            required: true,
        }
    }
};
</script>

<style></style>